package com.gordon.tips.service.impl;

import java.util.List;

import com.gordon.tips.dao.GameDao;
import com.gordon.tips.domain.Item;
import com.gordon.tips.domain.ItemTheme;
import com.gordon.tips.domain.ItemType;
import com.gordon.tips.service.GameService;

/**
 * implement of game service layer
 * @author Gordon Hwang
 *2011.12.15 14:14
 */

public class GameServiceImpl implements GameService {

	private GameDao gameDao;
	public List<Item> listItems(int start, int size) {
		// TODO Auto-generated method stub
		return gameDao.listItems(start, size);
	}
	
	
	public void saveItem(Item item) {
		gameDao.saveItem(item);
		
	}
	
	public Item getItemById(int id) {		
		return gameDao.getItemById(id);
	}
	
	//getter and setter
	
	
	public GameDao getGameDao() {
		return gameDao;
	}
	public void setGameDao(GameDao gameDao) {
		this.gameDao = gameDao;
	}


	
	public void delItem(int id) {
		gameDao.delItem(id);		
	}


	public void updateItem(Item item, int id) {
		gameDao.updateItem(item,id);
		
	}


	public List<ItemType> listItemTypes() {
		
		return gameDao.listItemTypes();
	}


	public List<ItemTheme> listItemThemes() {
		
		return gameDao.listItemThemes();
	}


	public int  addItemType(String name) {
		return gameDao.addItemType(name);
		
	}


	public int addItemTheme(String name) {
	
		return gameDao.addItemTheme(name);
	}


	
	

}
